// form表单配置
export const adminFormConfig = {
  userRole: 0,
  // 下拉框的选项，isFuzzyQuery是否为模糊查询选项
  selectOptions: [
    { label: '姓名', value: 'name', isFuzzyQuery: true },
    { label: '编号', value: 'identify' },
    { label: '手机号码', value: 'phone' }
  ],
  // 功能按钮
  btnOptions: [
    { text: '添加', icon: 'EditPen' },
    { text: '上传', icon: 'Upload' },
    { text: '导出', icon: 'Download' }
  ]
}

// table表格配置
export const adminTableProps = {
  userRole: 0,
  tableColumnProps: [
    { prop: 'avatar', label: '头像', width: 100, slotName: 'avatar' },
    { prop: 'identify', label: '编号', width: 100 },
    { prop: 'name', label: '姓名', width: 120 },
    { prop: 'account', label: '账号', width: 180 },
    { prop: 'email', label: '邮箱', width: 180 },
    { prop: 'gender', label: '性别', width: 80 },
    { prop: 'phone', label: '手机号码', width: 130 },
    { prop: 'role', label: '角色', width: 80, slotName: 'role' },
    { prop: 'state', label: '状态', width: 80, slotName: 'state' },
    { prop: 'handle', label: '操作', width: 150, slotName: 'handle' }
  ]
  // handleBtn: [
  //   {type: 'primary', text: '编辑', s}
  // ]
}

export const adminModelConfig = {
  userRole: 0,
  formItems: [
    {
      field: 'name',
      type: 'input',
      label: '真实姓名',
      placeholder: '请输入真实姓名',
      rules: [{ required: true, message: '姓名不能为空!', trigger: 'blur' }]
    },
    {
      field: 'account',
      type: 'input',
      label: '用户账号',
      placeholder: '请输入用户账号',
      noChinese: true,
      rules: [{ required: true, message: '账号不能为空!', trigger: 'blur' }]
    },
    {
      field: 'phone',
      type: 'input',
      label: '手机号码',
      noChinese: true,
      placeholder: '请输入手机号码'
    },
    {
      field: 'email',
      type: 'input',
      label: '电子邮箱',
      noChinese: true,
      placeholder: '请输入电子邮箱'
    },
    {
      field: 'gender',
      type: 'select',
      label: '用户性别',
      placeholder: '请选择性别',
      options: [
        { title: '男', value: '男' },
        { title: '女', value: '女' }
      ],
      rules: [{ required: true, message: '用户性别不能为空!', trigger: 'blur' }]
    }
  ],
  labelWidth: '80px',
  colLayout: { span: 24 },
  // itemStyle: {}
}
